#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
    int N;
    cin >> N;
    int i = 0;
    int odd = 0;
    int even = 0;
    while(i < N)
    {
        int temp;
        cin >> temp;
        if(temp % 2 == 0)
            even++;
        else
            odd++;
        i++;
        
    }
    cout << odd <<" "<< even;
        
}